<#compress>
<!DOCTYPE html>
<html>
	<head>
		<title>系统日志</title>
		<meta name="keywords" content="keyword1,keyword2,keyword3">
		<meta name="description" content="this is my page">
		<meta name="content-type" content="text/html; charset=UTF-8">
		<base href="${webroot}">
		<#include "../../template/easyui.ftl" parse="true" encoding="UTF-8">
	</head>
	<body>
		<table class="easyui-datagrid"  id="loggrid"
				  		 data-options="
				  		 	striped:true,
				  		 	border:false,
				  		 	url: 'syslog/syslog_list.grid',
				  		 	method: 'get',
				  		 	pageSize:20,
				  		 	rownumbers: true,
				  		 	pagination: true,
				  		 	fit: true,
				  		 	toolbar: '#tb',
				  		 	onDblClickRow: module.onDblClickRow
				  		 ">
					
					<thead>
						<tr>
							<th data-options="field:'id',checkbox:true"></th>
							<th data-options="field:'sl_uri',width:250,sortable:true">URL</th>
							<th data-options="field:'sl_remark',width:150,sortable:true">资源</th>
							<th data-options="field:'sl_method',width:60,sortable:true">请求方式</th>
							<th data-options="field:'sl_data',width:200,sortable:true">参数</th>
							<th data-options="field:'sl_ip',width:150,sortable:true">ip</th>
							<th data-options="field:'sl_pass',width:60,sortable:true,formatter:format,align:'center'">是否通过</th>
							<th data-options="field:'u_alias',width:150,sortable:true">用户</th>
							<th data-options="field:'sl_cdate',width:150,sortable:true">访问时间</th>
							<th data-options="field:'sl_mseconds',width:100,sortable:true">耗时(毫秒)</th>
							<th data-options="field:'sl_referer',width:250,sortable:true">Referer</th>
						</tr>
					</thead>
				</table>
		<div id="tb" style="padding: 10px;display: none;">
			url:<input id="sl_uri" class="easyui-textbox" data-options="prompt:'输入关键字进行查询'" style="width:140px;">
			资源：<input id="sl_remark" class="easyui-textbox" data-options="prompt:'输入关键字进行查询'" style="width:140px;">
			IP：<input id="sl_ip" class="easyui-textbox" data-options="prompt:'输入关键字进行查询'" style="width:140px;">
			时间：<input id="sl_cdate" class="easyui-datebox" data-options="prompt:'输入开始上期'" style="width:140px;">
			至<input id="sl_cdate1" class="easyui-datebox" data-options="prompt:'输入结束日期'" style="width:140px;">
			<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-search" onclick="syslogSearch();">查询</a>
			<!-- <a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-reload" onclick="$('#loggrid').datagrid('reload');">刷新</a> -->
		</div>
	</body>
	<script type="text/javascript">
	function format(value, row, index){
		return value ?"<img src=\"res/img/ok.png\"/>":"<img src=\"res/img/cross.png\"/>";
	}
	function syslogSearch(){
		var filters=new Array();
		filters.push(add_condition("and", "等于", "a", "sl_uri", $('#sl_uri').textbox('getValue'), "", "text"));		
		filters.push(add_condition("and", "等于", "a", "sl_remark", $('#sl_remark').textbox('getValue'), "", "text"));
		filters.push(add_condition("and", "等于", "a", "sl_ip", $('#sl_ip').textbox('getValue'), "", "text"));
		if(""!=$('#sl_cdate').datebox('getValue')){
		filters.push(add_condition("and", "GreaterEq", "a", "sl_cdate", $('#sl_cdate').datebox('getValue'), "", "date"));
		}
		if(""!=$('#sl_cdate1').datebox('getValue')){
			filters.push(add_condition("and", "LessEq", "a", "sl_cdate", $('#sl_cdate1').datebox('getValue'), "", "date"));
			}
		fun_query('loggrid',filters);
	}
	$("#tb").show();
	</script>
</html>
</#compress>